package gui;
import java.awt.BorderLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.ListModel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/

/** * This is  aclass for the GUI. * @author Tola Ashiiru * */
public class PlayerGUI extends javax.swing.JFrame {
	private JPanel SongsList;
	private JPanel jPanel1;
	private JList jList1;
	private JButton pauseButton;
	private JButton playButton;
	private JButton stopButton;
	private JButton searchButton;
	private JTextField SearchBar;
	private JLabel Songs;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				PlayerGUI inst = new PlayerGUI();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public PlayerGUI() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setResizable(false);
			{
				SongsList = new JPanel();
				GroupLayout SongsListLayout = new GroupLayout((JComponent)SongsList);
				SongsList.setLayout(SongsListLayout);
				getContentPane().add(SongsList, BorderLayout.CENTER);
				SongsList.setPreferredSize(new java.awt.Dimension(527, 357));
				{
					jPanel1 = new JPanel();
					GroupLayout jPanel1Layout = new GroupLayout((JComponent)jPanel1);
					jPanel1.setLayout(jPanel1Layout);
					{
						ListModel jList1Model = 
							new DefaultComboBoxModel(
									new String[] { "Item One", "Item Two" });
						jList1 = new JList();
						jList1.setModel(jList1Model);
						jList1.setSize(97, 316);
					}
						jPanel1Layout.setHorizontalGroup(jPanel1Layout.createSequentialGroup()
						.addComponent(jList1, GroupLayout.PREFERRED_SIZE, 138, GroupLayout.PREFERRED_SIZE)
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 0, Short.MAX_VALUE));
						jPanel1Layout.setVerticalGroup(jPanel1Layout.createSequentialGroup()
						.addComponent(jList1, GroupLayout.PREFERRED_SIZE, 194, GroupLayout.PREFERRED_SIZE)
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
				}
				{
					SearchBar = new JTextField();
					SearchBar.setText("Search");
				}
				{
					searchButton = new JButton();
					searchButton.setText("Search");
				}
				{
					stopButton = new JButton();
					stopButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/stop.gif")));
				}
				{
					playButton = new JButton();
					playButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/Play1Normal.png")));
				}
				{
					pauseButton = new JButton();
					pauseButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/Pause_Btn.png")));
				}
				{
					Songs = new JLabel();
					Songs.setText("Songs");
				}
				SongsListLayout.setHorizontalGroup(SongsListLayout.createSequentialGroup()
					.addGroup(SongsListLayout.createParallelGroup()
					    .addComponent(jPanel1, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 143, GroupLayout.PREFERRED_SIZE)
					    .addGroup(GroupLayout.Alignment.LEADING, SongsListLayout.createSequentialGroup()
					        .addGroup(SongsListLayout.createParallelGroup()
					            .addComponent(stopButton, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE)
					            .addGroup(GroupLayout.Alignment.LEADING, SongsListLayout.createSequentialGroup()
					                .addComponent(Songs, GroupLayout.PREFERRED_SIZE, 37, GroupLayout.PREFERRED_SIZE)
					                .addGap(11)))
					        .addComponent(playButton, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE)
					        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
					        .addComponent(pauseButton, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)))
					.addGap(37)
					.addComponent(SearchBar, GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE)
					.addGap(25)
					.addComponent(searchButton, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(175, Short.MAX_VALUE));
				SongsListLayout.setVerticalGroup(SongsListLayout.createSequentialGroup()
					.addGroup(SongsListLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
					    .addComponent(SearchBar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
					    .addComponent(searchButton, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
					    .addComponent(stopButton, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
					    .addComponent(playButton, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
					    .addComponent(pauseButton, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE))
					.addGap(0, 115, Short.MAX_VALUE)
					.addComponent(Songs, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
					.addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE));
			}
			pack();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	

}
